// components/bookItem/bookItem.js
const app = getApp()
Component({
  options: {
    multipleSlots: true // 在组件定义时的选项中启用多slot支持
  },

  /**
   * 组件的属性列表
   */
  properties: {
    image: {
      type: String,
      value: 'https://img3.doubanio.com/view/subject/m/public/s29653026.jpg'
    },
    title: {
      type: String,
      value: 'TITLE'
    },
    content: {
      type: String,
      value: 'CONTENT CONTENT CONTENT CONTENT CONTENT | CONTENT CONTENT CONTENT CONTENT CONTENT | CONTENT CONTENT CONTENT CONTENT CONTENT'
    },
    bookid: {
      type: String,
      value: '1016003'
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    gotoBook: function(e) {
      app.changePageWithData({
        url: '/pages/book/bookPage/bookPage'
      }, wx.navigateTo, {
          bookid: this.properties.bookid
      })
    }
  }
})
